import { FormItemType } from "@/components/CustomForm/utils/types";
import { ListPages, ResponseModel } from "@/core/models/basic.model";
import { TableColumnProps } from "@arco-design/web-react";
import { ColumnProps, TableProps } from "@arco-design/web-react/es/Table";

export interface CTableColumnProps extends TableColumnProps {
  search?: FormItemType;
}

export interface CustomTablePropsInt<T extends Record<string, any>> {
  rowKey?: string;
  columns: ColumnProps<T>[];
  data?: Array<T>;
  getData?: (params: any) => Promise<ResponseModel<ListPages<any>>>;
  height?: number;
  tableAttrs?: TableProps;
  operationButtons?: React.ReactElement;
  id?: string;
  selectionType?: "checkbox" | "radio";
  selectChange?: (selectedRowKeys: any[], selectedRows: any[]) => void;
}

export interface TableStyleInt {
  borderCell: boolean;
  stripe: boolean;
  size: "default" | "middle" | "small" | "mini";
}
